/**
 * 
 */
package net.cmath.po;

/**
 * @author Administrator
 *
 */
public class FlexObject {

	private int code = 200;
	private String msg = "";
	private Object data;
	public int getCode() {
		return code;
	}
	public void setCode(int code) {
		this.code = code;
	}
	public String getMsg() {
		return msg;
	}
	public void setMsg(String msg) {
		this.msg = msg;
	}
	public Object getData() {
		return data;
	}
	public void setData(Object data) {
		this.data = data;
	}
	
	public static FlexObject returnObject(int code, Object data) {
		FlexObject o = new FlexObject();
		o.setCode(code);
		o.setData(data);
		return o;
	}
	
	public static FlexObject returnCode(int code) {
		FlexObject o = new FlexObject();
		o.setCode(code);
		return o;
	}
	
	public static FlexObject returnObject(Object data) {
		FlexObject o = new FlexObject();
		o.setData(data);
		return o;
	}
}
